# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=asteroid-calculator
pkgver=0_git20210517
pkgrel=0
_commit="f6cb4cd12a1bed8f491945f8d26bb87bfcfeaa04"
pkgdesc="Default calculator app for AsteroidOS"
url="https://github.com/AsteroidOS/asteroid-calculator"
# armhf blocked by qml-asteroid
arch="all !armhf"
license="GPL-3.0-or-later"
depends="mapplauncherd"
makedepends="
	extra-cmake-modules
	qml-asteroid-dev
	qt5-qtbase-dev
	qt5-qtdeclarative-dev
	"
source="https://github.com/AsteroidOS/asteroid-calculator/archive/$_commit/asteroid-calculator-$_commit.tar.gz"
builddir="$srcdir/$pkgname-$_commit"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
c9974600e11165599f4bdf33dbd3c0fe150fab69cdfc64a89234cda34a17f05788362c31a8abf9e2e01d30371a187cffb35ebe0665b18c9a15daa5883a1129e2  asteroid-calculator-f6cb4cd12a1bed8f491945f8d26bb87bfcfeaa04.tar.gz
"
